package com.skytech.component.crawler.scratch;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Service
public class TargetRulesService {
    @Autowired
    private TargetRulesDAO targetRulesDAO;

    public void saveOne(TargetRules targetRules){
        targetRules.setGenerateTime(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(LocalDateTime.now()));
        targetRulesDAO.save(targetRules);
    }
}
